var BLOCK_FN = {}; var PAGE_LINK = {"CART":"en\/cart","LOGIN":"member-login","REGISTER":"register","CONTACT":"en\/contact-us","CUSTOMER_ORDER_LIST":"member-orders","ORDER":"order"}; BLOCK_FN["49"] = function(BLOCK, SETTING) { /* Header */ const slider = new Swiper(`#slider-block-${BLOCK.ID}`, { slidesPerView: 1, autoplay: { delay: 5000, }, loop: true, navigation: { nextEl: `#swiper-next-${BLOCK.ID}`, prevEl: `#swiper-prev-${BLOCK.ID}` } }); window.headerMemberLoginFn = (result, options) => { popoverAlert.show( document.getElementById(`${options.prefix}${options.type || 'email'}`), result.message, 2400, `btn ${(result.status === true) ? 'btn-success' : 'btn-danger'} text-left`, false ); if (result.status === true) { setTimeout(() => { window.location.reload(); }, 1500); } } const AllCategories = { data() { return { CATEGORIES: [], LOAD: true, } }, methods: { get(id = '', parentId = '') { const self = this; axios.get(getEndpoint('CATEGORY', id)).then(response => { if (parentId != '') { const findCat = Array.from(self.CATEGORIES).find(c => c.ID == parentId); const findCat2 = Array.from(findCat.CHILDREN).find(c => c.ID == id); findCat2['CHILDREN'] = response.data; } else if (id != '') { const findCat = Array.from(self.CATEGORIES).find(c => c.ID == id); findCat['CHILDREN'] = response.data; } else { self.CATEGORIES = response.data; } self.LOAD = false; }).catch(error => console.warn(`Categories not loaded => ${error}`)); }, } }; Vue.createApp(AllCategories).mount(`#menu-all-categories-${BLOCK.ID}`); window[`headercart-cb-${BLOCK.ID}`] = () => { loadSubFolder({ pageId: 1, blockParentId: 1001, subFolder: 'cart', success: function (loadRes) { let popupContent = T(`#header-cart-panel-${BLOCK.ID} .drawer-body`); popupContent.html(loadRes); evalScripts(popupContent[0].innerHTML); } }); } if (CART_DROPDOWN_LIST === true) { const cartDropdownBtn = T('.header-cart-dropdown'), dropdownContent = T(`.header-cart-dropdown-list`), cartBtnParent = cartDropdownBtn.length ? T(cartDropdownBtn[0].parentNode) : null; let status = 1; callbacks.cart.add.push(() => { status = 1; }); if (cartDropdownBtn.length && dropdownContent.length) { cartDropdownBtn.on('mouseenter', () => { if (matchMedia("screen and (max-width:768px)").matches === true) return; if (status == 1) { dropdownContent.html(''); dropdownContent.addClass('is-loading'); } loadSubFolder({ pageId: 1, blockParentId: 1001, subFolder: 'cart', success: function (loadRes) { dropdownContent.html(loadRes); evalScripts(dropdownContent[0].innerHTML); dropdownContent.removeClass('is-loading'); status = ''; } }); cartDropdownBtn.addClass('cart-viewed'); dropdownContent.removeClass('d-none'); }); cartBtnParent.on('mouseleave', () => { if (matchMedia("screen and (max-width:768px)").matches === true) return; setTimeout(() => { cartDropdownBtn.removeClass('cart-viewed'); dropdownContent.addClass('d-none'); }, 150); }); } } window.onscroll = () => { if (document.body.scrollTop > T('header').height() || document.documentElement.scrollTop > T('header').height()) { T(`#scroll-to-up-${BLOCK.ID}`).show(); } else { T(`#scroll-to-up-${BLOCK.ID}`).hide(); } }; T(`#scroll-to-up-${BLOCK.ID}`).on('click', () => { scroll({ top: 0, behavior: "smooth" }); }); if (T('[data-search="live-search"]').length > 0) { const dynamicSearch = { data() { return { data: '', searchVal: '', } }, mounted() { const self = this; const srv = T('#live-search')[0].dataset.licence == '1' ? '/srv/service/product/searchAll/' : '/srv/service/product/search/'; var timer = null; T('#live-search').on('keyup', () => { clearTimeout(timer); if (self.searchVal.length >= 3) { timer = setTimeout(() => { axios.get(`${srv}${self.searchVal}`).then(response => { self.data = response.data; }); }, 250); } else { self.data = ''; } }); document.addEventListener('click', e => { var Dom = e.target.nodeName == 'I' ? e.target.parentElement : e.target; const parentDom = Dom.closest('#search'); if (parentDom == null) { self.searchVal = ''; self.data = ''; } }); }, } Vue.createApp(dynamicSearch).mount(`#search`); } T(`#toggleVisiblePassword${BLOCK.ID}`).on('click', e => { const icon = e.target; if (icon == null && T(icon).length < 1) return; const type = T(icon).hasClass('ti-eye-off') ? 'text' : 'password'; T(icon.closest('.input-group').querySelector('input')).attr('type', type); T(icon).toggleClass('ti-eye-off text-gray ti-eye text-primary'); }); let nav = T(`.menu-${BLOCK.ID}`); let navTime; T(nav).on('mouseenter', () => { navTime = setTimeout(() => { if (!T(nav).hasClass('active')) T(nav).addClass("active"); }, 250); }); T(nav).on('mouseleave', () => { T(nav).removeClass('active'); clearTimeout(navTime); }); Cart.callback.add.push(function () { if (T("#add2cartNotification").length > 0) { T(`#add2cartNotification`).addClass('active'); setTimeout(() => { T(`#add2cartNotification`).removeClass('active'); }, 5000); } }); } try{ BLOCK_FN["49"]({"ID":49,"PARENT_ID":1001,"PAGE_ID":13,"NAME":"\u00dcst K\u0131s\u0131m","ASSETS":"\/theme\/v5-interkidsy\/assets\/"}, {"IS_STICKY":1,"DISPLAY_TITLE":1,"MENU_SELECTED":"","BRANDS":"\/sepet"}); }catch(ex){ console.error('HATA VAR : Üst Kısım/13'); console.error(ex); } BLOCK_FN["51"] = function(BLOCK, SETTING) { /* ContactInfo */ } try{ BLOCK_FN["51"]({"ID":51,"PARENT_ID":1030,"PAGE_ID":13,"NAME":"Contact Us","ASSETS":"\/theme\/v5-vesti\/assets\/"}, {"DISPLAY_TITLE":"1","MAP_HTML_CODE":"","FIRM_NAME":"interkidsy","FIRM_ADDRESS":"Duacinari Mah. Visne Caddesi No:146\/ A Yildirim \/Bursa \/T\u00fcrkiye","FIRM_COUNTRY":"","FIRM_CITY":"","FIRM_TOWN":"","FIRM_PHONE":"+90 850 532 35 70","FIRM_FAX":"","FIRM_EMAIL":"info@interkidsy.com","FIRM_TAX_OFFICE":"Y\u0131ld\u0131r\u0131m","FIRM_TAX_NUMBER":"4651164891","FIRM_TRADE_REGISTER_NUMBER":"","FIRM_MERNIS_NO":"0465 1164 8910 0001","FIRM_KEP_ADDRESS":"interkidsy@hs03.kep.tr","FIRM_FACEBOOK":"","FIRM_TWITTER":"","FIRM_PINTEREST":"","FIRM_INSTAGRAM":"","FIRM_YOUTUBE":"","FIRM_WHATSAPP":""}); }catch(ex){ console.error('HATA VAR : Contact Us/13'); console.error(ex); } BLOCK_FN["52"] = function(BLOCK, SETTING) { /* ContactForm */ T(`#reload-captcha-${BLOCK.ID}`).on('click', e => { document.getElementById(`contactform-captcha-${BLOCK.ID}`).setAttribute('src', `/SecCode.php?${new Date().getTime()}`); }); T(`#contact-form-${BLOCK.ID}`).on('submit', e => { e.stopPropagation(); e.preventDefault(); const formEl = e.target; popoverAlert.hideAll(); if(!T.checkValidity(formEl)) return; const data = new FormData(formEl); T.buttonLock.dom = document.getElementById(`#contactform-sendbtn-${BLOCK.ID}`); T.buttonLock.lock(); axios.post(formEl.action, data).then(response => { const result = response.data; const element = T(`#contactform-${result.msg}-${BLOCK.ID}`)[0] || T(`#contactform-${result.key}-${BLOCK.ID}`)[0]; T.buttonLock.unlock(); T(`#reload-captcha-${BLOCK.ID}`).trigger('click'); if(result.success > 0) { T.notify({ text: 'The form has been sent to us', className: 'success', duration: 3200, iconClass : 'ti-thumbs-up', }); formEl.reset(); T(`#contactform-resetbtn-${BLOCK.ID}`).trigger('click'); return; } popoverAlert.show( element.type == 'checkbox' ? element.nextElementSibling : element, 'This field is required', 3000, `btn btn-danger no-radius text-left`, true, `${(result.msg == 'seccode' || element.type == 'checkbox') ? '' : 'inline'}` ); }).catch(error => { console.warn(`Contact form send error => ${error}`); T.buttonLock.unlock(); }); }); T(`#contactform-resetbtn-${BLOCK.ID}`).on('click', e => { Array.from(e.target.closest('form').querySelectorAll('.input-placeholder.focused, .error-input')).forEach(item => { item.classList.remove('focused'); item.classList.remove('error-input'); }); Array.from(e.target.closest('form').querySelectorAll('.error-input-msg')).forEach(item => { item.remove(); }); }); } try{ BLOCK_FN["52"]({"ID":52,"PARENT_ID":1029,"PAGE_ID":13,"NAME":"Contact Form","ASSETS":"\/theme\/v5-vesti\/assets\/"}, {"DISPLAY_TITLE":"1","DISPLAY_SECURITY_CODE":0,"IS_GOOGLE_RECAPTCHE_ACTIVE":0,"DISPLAY_PRIVACY_POLICY":"1","IS_REQUIRED_FIRSTNAME":"1","IS_REQUIRED_LASTNAME":"1","IS_REQUIRED_EMAIL":"1","IS_REQUIRED_MESSAGE":"1","IS_REQUIRED_PHONE":"1"}); }catch(ex){ console.error('HATA VAR : Contact Form/13'); console.error(ex); } BLOCK_FN["426"] = function(BLOCK, SETTING) { /* HtmlBlock */ } try{ BLOCK_FN["426"]({"ID":426,"PARENT_ID":1130,"PAGE_ID":13,"NAME":"Maps","ASSETS":"\/theme\/v5-interkidsy\/assets\/"}, {"CONTENT_LIST":[{"INDEX":1,"LISTNO":null,"TITLE":"","URL":"\/srv\/service\/content-v5\/load\/426?tabIndex=0","URL_TARGET":"","URL_REL":"","DATA1":"","DATA2":"","DATA3":"","CONTENT":"